package de.industronic.app;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;

/**
 * Description: <BR>
 * Date: 04.03.2013 <BR>
 * (c) Industronic GmbH & Co. KG <BR>
 * <BR>
 * 
 * @author achmetow
 */
public class MainActivity extends Activity
{

	public final static String EXTRA_MESSAGE = "de.industronic.app.MESSAGE";

	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu)
	{
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

	/** Called when the user clicks the Send button */
	public void sendMessage(View view)
	{
		// Do something in response to button
		Intent intent = new Intent(this, DispalyMessageActivity.class);
		EditText editText = (EditText) findViewById(R.id.edit_message);
		String message = editText.getText().toString();
		intent.putExtra(EXTRA_MESSAGE, message);
		startActivity(intent);
	}
}